<?php
include('header.php');
//session_start();
//require_once './class/class_onlinestore.php';
$storeID = $_GET['CheckOut'];
	$storeInfo = array();
	if(class_exists("OnlineStore")){
		if(isset($_SESSION['currentStore']))
			$Store = unserialize($_SESSION['currentStore']);
		else{
			$Store = new OnlineStore();
		}
		$Store->setStoreID($storeID);
		$storeInfo = $Store->getStoreInformation();
	}
	else{
		$ErrorMsg[] = "<p>The OnlineStore class in not available.</p>";
		$Store = NULL;
	}
?>

		<div class="container">
			<h2>Checkout</h2>
			<?php
				$Store->checkout();
				//echo $cust_data['firstName'];
				//$Store->updateStock();
				$_SESSION['currentStore'] = serialize($Store);
			?>
			<h2><a href="invoice.php">View Invoice</a></h2>
		</div>
<?php include('footer.php'); ?>